package Reeks5.VanRansbeeck.Kevin.View.Cards;

import Reeks5.VanRansbeeck.Kevin.Model.Kaart;

abstract public class CardDrawer {
    protected String imagepath;
    
    public CardDrawer() {
        this.imagepath = "images/cards/";
    }

    public String getImagepath() {
        return imagepath;
    }

    protected void setImagepath(String imagepath) {
        this.imagepath += imagepath;
    }
    
    public String getDeckURL() {
        String ret = this.getImagepath();
        
        ret += "deck.jpg";
        
        return ret;
    }
    
    public String getImageURL(Kaart kaart){
        String ret = this.getImagepath();
        
        switch (kaart.getWaarde()) {
            case Aas:       ret += "01";
                            break;
            case Twee:      ret += "02";
                            break;
            case Drie:      ret += "03";
                            break;
            case Vier:      ret += "04";
                            break;
            case Vijf:      ret += "05";
                            break;
            case Zes:       ret += "06";
                            break;
            case Zeven:     ret += "07";
                            break;
            case Acht:      ret += "08";
                            break;
            case Negen:     ret += "09";
                            break;
            case Tien:      ret += "10";
                            break;
            case Boer:      ret += "11";
                            break;
            case Dame:      ret += "12";
                            break;
            case Koning:    ret += "13";
                            break;
        }
        
        switch (kaart.getType()) {
            case Schoppen:  ret += "s";
                            break;
            case Klaveren:  ret += "c";
                            break;
            case Harten:    ret += "h";
                            break;
            case Ruiten:    ret += "d";
                            break;
        }
        
        ret += ".jpg";
        
        return ret;
    }
    
    public abstract String getDrawerName();
}
